import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { Row, Col, Card, Button, message, Form, Input, Modal, Select } from 'antd';
import StandardTable from 'components/StandardTable';
import PageHeaderLayout from '../../../layouts/PageHeaderLayout';
import styles from './list.less';
import information from '../../../utils/message';

const ButtonGroup = Button.Group;
const FormItem = Form.Item;
const confirm = Modal.confirm;
const Option = Select.Option;

const CreateForm = Form.create()((props) => {
    const { modalVisible, form, handleAdd, handleModalVisible, projectBer } = props;
    const okHandle = () => {
        form.validateFields((err, fieldsValue) => {
            if (err) return;
            const prime = fieldsValue;
            form.resetFields();
            handleAdd(prime, projectBer.id);
        });
    };
    const canaleModal = () => {
        handleModalVisible();
        form.resetFields();
    };
    return (
        <Modal
            title="编辑"
            visible={modalVisible}
            onOk={okHandle}
            onCancel={canaleModal}
            width={1100}
        >
            <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
                <Col md={12} sm={24}>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="整改报备项目名称"
                    >
                        {form.getFieldDecorator('name', {
                            rules: [{ required: true, message: '请输入整改报备项目名称' }],
                            initialValue: projectBer.name,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="项目个数"
                    >
                        {form.getFieldDecorator('xmCount', {
                            rules: [{ required: true, message: '请输入项目个数' }],
                            initialValue: projectBer.xmCount,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区地块数"
                    >
                        {form.getFieldDecorator('ncxjqCount', {
                            rules: [{ required: true, message: '请输入农村建新区地块数' }],
                            initialValue: projectBer.ncxjqCount,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区总面积(亩)"
                    >
                        {form.getFieldDecorator('ncjxqAreaM', {
                            rules: [{ required: true, message: '请输入农村建新区总面积(亩)' }],
                            initialValue: projectBer.ncjxqAreaM,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已供个数"
                    >
                        {form.getFieldDecorator('ncjxqCountYg', {
                            rules: [{ required: true, message: '请输入农村建新区已供个数' }],
                            initialValue: projectBer.ncjxqCountYg,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="城镇建新区总面积"
                    >
                        {form.getFieldDecorator('czxjqArea', {
                            rules: [{ required: true, message: '请输入城镇建新区总面积' }],
                            initialValue: projectBer.czxjqArea,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已供城镇建新区地块面积(亩)"
                    >
                        {form.getFieldDecorator('czxjqAreaMYg', {
                            rules: [{ required: true, message: '请输入已供城镇建新区地块面积(亩)' }],
                            initialValue: projectBer.czxjqAreaMYg,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="涉及村街个数"
                    >
                        {form.getFieldDecorator('cjCount', {
                            rules: [{ required: true, message: '请输入涉及村街个数' }],
                            initialValue: projectBer.cjCount,
                        })(
                            <Input placeholder="请输入涉及村街个数" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区总面积(公顷)"
                    >
                        {form.getFieldDecorator('ncjxqAreaGq', {
                            rules: [{ required: true, message: '请输入农村建新区总面积(公顷)' }],
                            initialValue: projectBer.ncjxqAreaGq,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已征面积(公顷)"
                    >
                        {form.getFieldDecorator('ncjxqAreaGqYz', {
                            rules: [{ required: true, message: '请输入农村建新区已征面积(公顷)' }],
                            initialValue: projectBer.ncjxqAreaGqYz,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                </Col>
                <Col md={12} sm={24}>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="拆旧区个数"
                    >
                        {form.getFieldDecorator('cjqCount', {
                            rules: [{ required: true, message: '请输入拆旧区个数' }],
                            initialValue: projectBer.cjqCount,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="拆旧区总面积"
                    >
                        {form.getFieldDecorator('cjqArea', {
                            rules: [{ required: true, message: '请输入拆旧区总面积' }],
                            initialValue: projectBer.cjqArea,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已征个数"
                    >
                        {form.getFieldDecorator('ncjxqCountYz', {
                            rules: [{ required: true, message: '请输入农村建新区已征个数' }],
                            initialValue: projectBer.ncjxqCountYz,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已供面积"
                    >
                        {form.getFieldDecorator('ncjxqAreaYg', {
                            rules: [{ required: true, message: '请输入农村建新区已供面积' }],
                            initialValue: projectBer.ncjxqAreaYg,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已征城镇建新区地块个数"
                    >
                        {form.getFieldDecorator('czxjqCountYz', {
                            rules: [{ required: true, message: '请输入已征城镇建新区地块个数' }],
                            initialValue: projectBer.czxjqCountYz,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已供城镇建新区总面积"
                    >
                        {form.getFieldDecorator('czxjqAreaYg', {
                            rules: [{ required: true, message: '请输入已供城镇建新区总面积' }],
                            initialValue: projectBer.czxjqAreaYg,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="城镇建新区地块个数"
                    >
                        {form.getFieldDecorator('czxjqCount', {
                            rules: [{ required: true, message: '请输入城镇建新区地块个数' }],
                            initialValue: projectBer.czxjqCount,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已征城镇建新区地块面积(公顷)"
                    >
                        {form.getFieldDecorator('czxjqAreaGqYz', {
                            rules: [{ required: true, message: '请输入已征城镇建新区地块面积(公顷)' }],
                            initialValue: projectBer.czxjqAreaGqYz,
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="盘活状态"
                    >
                        {form.getFieldDecorator('phJindu', {
                            rules: [{ required: true, message: '请输入正确的品牌名字' }],
                            initialValue: projectBer.phJindu,
                        })(
                            <Select style={{ width: '100%' }}>
                                <Option value="未开始">未开始</Option>
                                <Option value="盘活中">盘活中</Option>
                                <Option value="已完成">已完成</Option>
                            </Select>
                        )}
                    </FormItem>

                </Col>
            </Row>
        </Modal>
    );
});

const NewForm = Form.create()((props) => {
    const { modalVisible, form, handleAdd, handleModalVisible } = props;
    const okHandle = () => {
        form.validateFields((err, fieldsValue) => {
            if (err) return;
            const prime = fieldsValue;
            form.resetFields();
            handleAdd(prime);
        });
    };
    const canaleModal = () => {
        handleModalVisible();
        form.resetFields();
    };
    return (
        <Modal
            title="新增"
            visible={modalVisible}
            onOk={okHandle}
            onCancel={canaleModal}
            width={1100}
        >
            <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
                <Col md={12} sm={24}>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="整改报备项目名称"
                    >
                        {form.getFieldDecorator('name', {
                            rules: [{ required: true, message: '请输入整改报备项目名称' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="项目个数"
                    >
                        {form.getFieldDecorator('xmCount', {
                            rules: [{ required: true, message: '请输入项目个数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区地块数"
                    >
                        {form.getFieldDecorator('ncxjqCount', {
                            rules: [{ required: true, message: '请输入农村建新区地块数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区总面积(亩)"
                    >
                        {form.getFieldDecorator('ncjxqAreaM', {
                            rules: [{ required: true, message: '请输入农村建新区总面积(亩)' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已供个数"
                    >
                        {form.getFieldDecorator('ncjxqCountYg', {
                            rules: [{ required: true, message: '请输入农村建新区已供个数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="城镇建新区总面积"
                    >
                        {form.getFieldDecorator('czxjqArea', {
                            rules: [{ required: true, message: '请输入城镇建新区总面积' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已供城镇建新区地块面积(亩)"
                    >
                        {form.getFieldDecorator('czxjqAreaMYg', {
                            rules: [{ required: true, message: '请输入已供城镇建新区地块面积(亩)' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="涉及村街个数"
                    >
                        {form.getFieldDecorator('cjCount', {
                            rules: [{ required: true, message: '请输入涉及村街个数' }],
                        })(
                            <Input placeholder="请输入涉及村街个数" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区总面积(公顷)"
                    >
                        {form.getFieldDecorator('ncjxqAreaGq', {
                            rules: [{ required: true, message: '请输入农村建新区总面积(公顷)' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已征面积(公顷)"
                    >
                        {form.getFieldDecorator('ncjxqAreaGqYz', {
                            rules: [{ required: true, message: '请输入农村建新区已征面积(公顷)' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                </Col>
                <Col md={12} sm={24}>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="拆旧区个数"
                    >
                        {form.getFieldDecorator('cjqCount', {
                            rules: [{ required: true, message: '请输入拆旧区个数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="拆旧区总面积"
                    >
                        {form.getFieldDecorator('cjqArea', {
                            rules: [{ required: true, message: '请输入拆旧区总面积' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已征个数"
                    >
                        {form.getFieldDecorator('ncjxqCountYz', {
                            rules: [{ required: true, message: '请输入农村建新区已征个数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="农村建新区已供面积"
                    >
                        {form.getFieldDecorator('ncjxqAreaYg', {
                            rules: [{ required: true, message: '请输入农村建新区已供面积' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已征城镇建新区地块个数"
                    >
                        {form.getFieldDecorator('czxjqCountYz', {
                            rules: [{ required: true, message: '请输入已征城镇建新区地块个数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已供城镇建新区总面积"
                    >
                        {form.getFieldDecorator('czxjqAreaYg', {
                            rules: [{ required: true, message: '请输入已供城镇建新区总面积' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="城镇建新区地块个数"
                    >
                        {form.getFieldDecorator('czxjqCount', {
                            rules: [{ required: true, message: '请输入城镇建新区地块个数' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="已征城镇建新区地块面积(公顷)"
                    >
                        {form.getFieldDecorator('czxjqAreaGqYz', {
                            rules: [{ required: true, message: '请输入已征城镇建新区地块面积(公顷)' }],
                        })(
                            <Input placeholder="请输入" />
                        )}
                    </FormItem>
                    <FormItem
                        labelCol={{ span: 11 }}
                        wrapperCol={{ span: 13 }}
                        label="盘活状态"
                    >
                        {form.getFieldDecorator('phJindu', {
                            rules: [{ required: true, message: '请输入正确的品牌名字' }],
                            initialValue: '未开始',
                        })(
                            <Select style={{ width: '100%' }}>
                                <Option value="未开始">未开始</Option>
                                <Option value="盘活中">盘活中</Option>
                                <Option value="已完成">已完成</Option>
                            </Select>
                        )}
                    </FormItem>

                </Col>
            </Row>
        </Modal>
    );
});

@connect(({ project, loading }) => ({
    project,
    loading: loading.models.project,
}))
@Form.create()
export default class project extends PureComponent {
    state = {
        loading: false,
        selectedRows: [],
        modalVisible: false,
        modalVisibleAdd: false,
        projectBer: {},
        searchForm: {},
    };

    componentDidMount() {
        this.gainList(1, 10);
    }

    gainList = (page, size, data) => {
        const { dispatch } = this.props;
        dispatch({
            type: 'project/fetch',
            payload: {
                page,
                size,
                data,
            },
        });
    }

    handleModalVisible = (flag) => {
        this.setState({
            modalVisible: !!flag,
        });
    };

    projectAdd = (flag) => {
        this.setState({
            modalVisibleAdd: !!flag,
        });
    };

    handleEdit = (fields, id) => {
        const parime = fields;
        const { dispatch } = this.props;
        dispatch({
            type: 'project/edit',
            payload: {
                ...parime,
                id,
            },
            callback: (data) => {
                information(data);
                this.gainList(this.props.project.project.page, this.props.project.project.size, this.state.searchForm);
            },
        });

        this.setState({
            modalVisible: false,
        });
    };

    handleAdd = (fields) => {
        const parime = fields;
        const { dispatch } = this.props;
        dispatch({
            type: 'project/add',
            payload: {
                ...parime,
            },
            callback: (data) => {
                information(data);
                this.gainList(this.props.project.project.page, this.props.project.project.size, this.state.searchForm);
            },
        });

        this.setState({
            modalVisibleAdd: false,
        });
    };

    projectDel = (fields) => {
        const { dispatch, project: { project } } = this.props;
        confirm({
            title: '删除',
            content: '确认删除本条条目?',
            okType: 'danger',
            okText: '确认',
            cancelText: '取消',
            onOk: () => {
                dispatch({
                    type: 'project/del',
                    payload: {
                        id: fields.id,
                    },
                    callback: (data) => {
                        information(data);
                        this.gainList(project.page, project.size, this.state.searchForm);
                    },
                });
            },
            onCancel() {
            },
        });
    }

    handleSelectRows = (rows) => {
        this.setState({
            selectedRows: rows,
        });
    };

    handleStandardTableChange = (pagination, filters, sorter) => {
        const data = { ...pagination.searchForm };
        this.gainList(pagination.current, pagination.pageSize, data);
    };

    handleFormReset = () => {
        const { form, dispatch } = this.props;
        form.resetFields();
        this.setState({ searchForm: {} });
    };

    handleSearch = (e) => {
        e.preventDefault();

        const { dispatch, form } = this.props;

        form.validateFields((err, fieldsValue) => {
            if (err) return;
            if (fieldsValue.id && fieldsValue.id.toString().length > 10) {
                message.error('id小于等于10位');
                return;
            }
            this.setState({
                searchForm: { ...fieldsValue },
            });
            dispatch({
                type: 'project/fetch',
                payload: {
                    page: 1,
                    size: this.props.project.project.size,
                    data: {
                        ...fieldsValue,
                    },
                },
            });
        });
    };

    renderprojectForm() {
        const { getFieldDecorator } = this.props.form;
        return (
            <Form onSubmit={this.handleSearch} layout="inline">
                <Row gutter={{ md: 8, lg: 24, xl: 48 }}>
                    <Col md={8} sm={24}>
                        <FormItem label="项目个数">
                            {getFieldDecorator('xmCount', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="拆旧区个数">
                            {getFieldDecorator('cjqCount', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="涉及村街个数">
                            {getFieldDecorator('cjCount', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="农村建新区地块数">
                            {getFieldDecorator('ncxjqCount', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="拆旧区总面积">
                            {getFieldDecorator('cjqArea', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="农村建新区总面积(公顷)">
                            {getFieldDecorator('ncjxqAreaGq', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="农村建新区总面积(亩)">
                            {getFieldDecorator('ncjxqAreaM', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="农村建新区已征个数">
                            {getFieldDecorator('ncjxqCountYz', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>
                    <Col md={8} sm={24}>
                        <FormItem label="农村建新区已供个数">
                            {getFieldDecorator('ncjxqCountYg', {
                                initialValue: '',
                            })(
                                <Input placeholder="请输入" />
                            )}
                        </FormItem>
                    </Col>

                    <Col md={8} sm={24}>
                        <span className={styles.submitButtons} style={{ textAlign: 'right' }}>
                            <Button icon="search" htmlType="submit">查询</Button>
                            <Button style={{ marginLeft: 8 }} type="dashed" onClick={this.handleFormReset}>重置</Button>
                            <Button style={{ marginLeft: 8 }} type="primary" onClick={this.projectAdd}>新增</Button>
                        </span>
                    </Col>
                </Row>
            </Form>
        );
    }

    render() {
        const { selectedRows, projectBer, modalVisible, modalVisibleAdd } = this.state;
        const { project: { project }, loading, dispatch } = this.props;
        const parentMethods = {
            handleAdd: this.handleEdit,
            handleModalVisible: this.handleModalVisible,
            projectBer,
            loading,
        };
        const Addproject = {
            loading,
            handleAdd: this.handleAdd,
            handleModalVisible: this.projectAdd,
        };
        const columns = [
            {
                title: '整改报备项目',
                dataIndex: 'name',
            },
            {
                title: '项目个数',
                dataIndex: 'xmCount',
            },
            {
                title: '拆旧区个数',
                dataIndex: 'cjqCount',
            },
            {
                title: '涉及村街个数',
                dataIndex: 'cjCount',
            },
            {
                title: '拆旧区总面积',
                dataIndex: 'cjqArea',
            },
            {
                title: '农村建新区地块数',
                dataIndex: 'ncxjqCount',
            },
            {
                title: '农村建新区总面积(公顷)',
                dataIndex: 'ncjxqAreaGq',
            },
            {
                title: '农村建新区总面积(亩)',
                dataIndex: 'ncjxqAreaM',
            },
            {
                title: '状态',
                dataIndex: 'phJindu',
            },
            {
                title: '操作',
                render: (val, record) => (
                    <Fragment>
                        <ButtonGroup>
                            <Button type="ghost" onClick={() => {
                                this.handleModalVisible(true);
                                this.setState({
                                    projectBer: record,
                                });
                            }}>编辑</Button>
                            <Button type="danger" onClick={() => {
                                this.projectDel(record);
                            }}>删除</Button>
                        </ButtonGroup>
                    </Fragment>
                ),
            },
        ];

        return (
            <PageHeaderLayout title="整改报备项目">
                <Card bordered={false}>
                    <div className={styles.tableList}>
                        <div className={styles.tableListForm}>
                            {this.renderprojectForm()}
                        </div>
                        <StandardTable
                            selectedRows={selectedRows}
                            loading={loading}
                            data={project}
                            columns={columns}
                            onSelectRow={this.handleSelectRows}
                            onChange={this.handleStandardTableChange}
                            searchForm={this.state.searchForm}
                        />
                    </div>
                </Card>
                <CreateForm
                    {...parentMethods}
                    modalVisible={modalVisible}
                />
                <NewForm
                    {...Addproject}
                    modalVisible={modalVisibleAdd}
                />
            </PageHeaderLayout>
        );
    }
}
